import { ApiProperty } from '@nestjs/swagger'
import { ModelOptions, prop } from '@typegoose/typegoose'

@ModelOptions({
    schemaOptions:{
        timestamps: true
    }
})
export class User {
    @ApiProperty({description: '用户名', example: 'zhangsan'})
    @prop()
    username: string

    @ApiProperty({description: '秘码', example: '123456'})
    @prop()
    password: string
}
